package com.example.consumer.controller;

import com.example.consumer.client.ProducerController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("consumer")
@Slf4j
public class ConsumerController {
    @Resource
    private ProducerController producerController;

    @GetMapping("/{id}")
    public String test(@PathVariable("id") String id) {
        log.info("进入消费者模块下的Controller层");
        return producerController.test(id);
    }

}
